<template>
  <div class="side-pic" @click.stop="$router.push('/video/' + id)">
    <div class="pic">
      <img :src="img_url" alt="" />
    </div>
    <div class="play-icon">
      <img src="@/assets/head/Rk.png" alt="" />
    </div>
    <div class="side-title">{{ title }}</div>
  </div>
</template>

<script>
export default {
  props: {
    img_url: String,
    title: String,
    id: [Number, String]
  }
}
</script>

<style lang="less" scoped>
.side-pic {
  height: 200px;
  padding: 10px 0;
  position: relative;

  .pic {
    height: 100%;

    img {
      height: 100%;
      width: 100%;
    }
  }
  .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    transform: translate(-50%);

    img {
      height: 100%;
      width: 100%;
    }
  }
  .side-title {
    position: absolute;
    left: 10px;
    color: #fff;

    &.side-title {
      bottom: 20px;
      font-weight: 700;
      font-size: 18px;
      width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}
</style>
